package com;

import com.main.TestDPSDKMain;
import com.project.utils.Dom4jUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Sweey Zhang
 * @description
 * @date 2021/8/9 14:12
 */
@SpringBootApplication
@RestController
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @GetMapping("getMe")
    public void getMe(){
        System.out.println("sss");
    }

    @GetMapping("/monitor/queryAll")
    public List getList(){
        try {
            TestDPSDKMain.getList();
        } catch (Exception e) {
            e.printStackTrace();
        }
        ArrayList arrayList = Dom4jUtil.parseDeviceInfo(TestDPSDKMain.FILE_PATH);
        return arrayList;
    }
}
